home *** CD-ROM | disk | FTP | other *** search
Text File | 1989-01-21 | 1.7 KB | 45 lines | [TEXT/MPS ] |
- Creating the Transfer DA
- ------------------------
- The Transfer DA is written for TML Pascal 2.5 (not the TML MPW
- Pascal), and MDS Assembler. It consists of an MDEF, and LDEF
- and the DRVR.
-
- To create the DA:
-
- • First compile all the Pascal source. Choosing
- “Transfer.pfiles” from the compiler will do this.
-
- • Next assemble all the Assembler source. Again, choosing
- “Transfer.files” from the assembler will accomplish this.
-
- • Compile the resource from MPW with the instruction
-
- rez rsrc.r -o rsrc
-
- • Finally, link all the pieces: the MDEF, the LDEF, the DRVR
- and, last of all, the DA. The link control files are
- “MDEF.link”, “LDEF.link”, “DRVR.link” and “Transfer DA.link”,
- respectively.
-
- In case you don't have MDS or Rez, I've included a complete set of
- intermediate files.
-
- Passing Data to the MDEF
- ------------------------
- Both the MDEF and the LDEF use the DA's private menu data; the
- “menudata” field of the global storage record contains a handle
- to this data. It's easy to pass this data to the LDEF; just put it
- in the list's refcon. Passing it to the MDEF is a bit trickier.
-
- First, the MDEF needs a place to store it (and other, scrolling-
- related, globals). Since this MDEF is for just one menu, it can
- keep menu globals in its code (if there were other menus using the
- MDEF, it would be better to keep a handle to an array of global
- data sets, one for each menu, in the MDEF). The assembler routines
- in “data.asm” access this data.
-
- Next, the DRVR needs a way to send the data to the MDEF. Simple -
- just invent another MDEF message, “msethandle”, which passes the
- “menudata” handle in the “hitpoint” field. Now the MDEF can get
- and use the menu data.
-